package com.hanhai.material.common.result;

/**
 * Project：health
 * Create by CC
 * Description:返回方法
 */
public class ResultTool {
    public static Result success() {
        return new Result(true);
    }

    public static Result success(String message) {
        return new Result(true, message);
    }

    public static <T> Result<T> success(T data) {
        return new Result(true, data);
    }

    public static Result fail() {
        return new Result(false);
    }

    public static Result fail(ResultCode resultEnum) {
        return new Result(false, resultEnum);
    }

    public static Result fail(String message) {
        return new Result(false, message);
    }
    public static <T> Result<T> fail(T data) {
        return new Result(false, data);
    }
}